#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import re
from pathlib import Path

home = Path().home()

file = f'{home}/.zshrc'

with open(file, 'r', encoding='utf-8') as f:
    file_data = f.read()

file_data = re.sub(r'ZSH_THEME="\w+"', 'ZSH_THEME="theme1"', file_data)

file_data = re.sub(r'# HYPHEN_INSENSITIVE="true"', 'HYPHEN_INSENSITIVE="true"', file_data)
file_data = re.sub(r"# zstyle ':omz:update' mode disabled", "zstyle ':omz:update' mode disabled", file_data)
file_data = re.sub(r'# ENABLE_CORRECTION="true"', 'ENABLE_CORRECTION="true"', file_data)
file_data = re.sub(r'# export LANG=en_US.UTF-8', 'export LANG=en_US.UTF-8', file_data)
file_data = re.sub(
    r'\nplugins=\([^)]*\)', '\nplugins=(zsh-user vi-mode tmux fzf-tab git-auto-fetch git-prompt sublime zoxide sudo extract colored-man-pages zsh-autosuggestions zsh-syntax-highlighting conda-zsh-completion fzf)', file_data)
with open(file, 'w', encoding='utf-8') as f:
    f.write(file_data)
    f.write("\n")
